# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-qt5platform-plugins
pkgver=5.6.5
_commit=965122fa305412037a9b877a18432a967d1341b7
pkgrel=3
pkgdesc='Qt platform plugins for DDE'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/qt5platform-plugins"
license=('LGPL3')
provides=('deepin-qt5dxcb-plugin')
conflicts=('deepin-qt5dxcb-plugin')
replaces=('deepin-qt5dxcb-plugin')
depends=('cairo' 'qt5-x11extras')
makedepends=('git' 'expac' 'qt5-xcb-private-headers' 'libglvnd' 'libxcb')
groups=('deepin')
source=("git+https://github.com/linuxdeepin/qt5platform-plugins.git#commit=$_commit")
sha512sums=('SKIP')

prepare() {
  cd qt5platform-plugins
  rm -r xcb/libqt5xcbqpa-dev wayland/qtwayland-dev
}

build() {
  cd qt5platform-plugins
  qmake-qt5 PREFIX=/usr QT_XCB_PRIVATE_INCLUDE=/usr/include/qtxcb-private CONFIG+=DISABLE_WAYLAND
  make
}

package() {
  cd qt5platform-plugins
  make INSTALL_ROOT="$pkgdir" install
}
